﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using KerriganDataContract.Customer;
using System.ComponentModel;

namespace KerriganDataContract.Code
{
    [DataContract]
    public class CodeDC : INotifyPropertyChanged
    {
        private Int32 _idCode;

        private DateTime _date;

        private string _score;

        private Int32 _idCustomer;



        [DataMember]
        public Int32 IdCode
        {
            get
            {
                return this._idCode;
            }
            set
            {
                this._idCode = value;
                OnPropertyChanged("IdCode");
            }
        }

        [DataMember]
        public DateTime Date
        {
            get
            {
                return this._date;
            }
            set
            {
                this._date = value;
                OnPropertyChanged("Date");
            }
        }

        [DataMember]
        public string Score
        {
            get
            {
                return this._score;
            }
            set
            {
                this._score = value;
                OnPropertyChanged("Score");
            }
        }

        [DataMember]
        public Int32 IdCustomer
        {
            get
            {
                return this._idCustomer;
            }
            set
            {
                this._idCustomer = value;
                OnPropertyChanged("IdCustomer");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string property)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(property));
            }
        }
    }
}
